from django.shortcuts import render
from django.http import HttpResponse


class C: ...


def index(request):
    data = '这是第二个应用的index函数'
    context = {'data': data, 'pk': 1}
    return render(request, "news/index.html", context)


def detail(request, pk):
    return HttpResponse('这是第二个应用的detail函数, pk=%s' % pk)
